﻿using System.ServiceModel;

// ReSharper disable CheckNamespace
namespace Ipmce.RemoteVoting.Common.Tools.Wcf.Unity.LifetimeManagers
// ReSharper restore CheckNamespace
{
	/// <summary>
	/// Unity lifetime manager to support <see cref="System.ServiceModel.IContextChannel"/>.
	/// </summary>
	public class UnityContextChannelLifetimeManager : UnityWcfLifetimeManager<IContextChannel>
	{
		/// <summary>
		/// Returns the appropriate extension for the current lifetime manager.
		/// </summary>
		/// <returns>The registered extension for the current lifetime manager, otherwise, null if the extension is not registered.</returns>
		protected override UnityWcfExtension<IContextChannel> FindExtension()
		{
			return UnityContextChannelExtension.Current;
		}
	}
}